my $file1=$ARGV[0];
my $file2=$ARGV[1];
open(FH,"<$file1") or die;
my @in1=<FH>;
chomp(@in1);
close(FH);
open(FH,"<$file2") or die;
my @in2=<FH>;
chomp(@in2);
close(FH);
my %vcf_hash_1 = ();
my $count_intotal_1 = 0;
my $count_intotal_2 = 0;
my $count_found = 0;
my $count_con = 0;
my $count_het_con = 0;
my $count_hom_con = 0;
foreach my $line(@in1){
	next if $line=~/^\#/;
	my @splitvcf=split "\t",$line;
	#next if $splitvcf[5] <=4;
	my $key = $splitvcf[0]."-".$splitvcf[1];
	$vcf_hash_1{$key} = $line;
	$count_intotal_1++;

}

foreach my $line(@in2){
	next if $line=~/^\#/;
	my @splitin=split "\t",$line;
	my $key_search = $splitin[0]."-".$splitin[1];
	$count_intotal_2++;
	if( exists $vcf_hash_1{$key_search} ){
		my @splitvcf=split "\t",$vcf_hash_1{$splitin[0]};
		$count_found++;
		if($splitvcf[9]=~/0\/1/){
			if($splitin[9]=~/0\/1/){
				$count_het_con++;
				$count_con++;
			}
		}
		else{
			if($splitin[9]=~/0\/0/ || $splitin[9]=~/1\/1/){
				$count_hom_con++;
				$count_con++;
			}
		}
	}
	
}
print("count_intotal_1 is: $count_intotal_1\n");
print("count_intotal_2 is: $count_intotal_2\n");
print("count_found is: $count_found\n");
print("count_con is: $count_con\n");
print("count_het_con is: $count_het_con\n");
print("count_hom_con is: $count_hom_con\n");